import store from '@/store'
// 表单设计按钮权限验证
export function onlHasPermi(binding) {
  const value = binding
  const all_permission = '*:*:*'
  const permissions = store.getters && store.getters.permissions
  if (value) {
    const permissionFlag = value
    const hasPermissions = permissions.some(permission => {
      return all_permission === permission || permissionFlag.includes(permission)
    })
    return hasPermissions
  } else {
    throw new Error(`请设置操作权限标签值`)
  }
}

